package com.yztc.orangeentertainment.ui.main.subscribefragment.staritem.starpicturefragment;

import android.content.Context;

import com.yztc.orangeentertainment.adapter.StarPictureAdapter;
import com.yztc.orangeentertainment.bean.staritembean.PictureListBean;
import com.yztc.orangeentertainment.config.SubscribeUrlConfig;

import java.util.List;
import java.util.Map;

/**
 * Created by My on 2016/10/8.
 */
public class PicturePresenter implements PictureContract.Presenter {
    PictureContract.View view;
    PicturreModle modle;

    public PicturePresenter(PictureContract.View view) {
        this.view = view;
        modle=new PicturreModle();
    }

    @Override
    public void getStarPictureFromNet(Map<String, String> params, final Context context) {
        modle.getStarPictureAll(SubscribeUrlConfig.PATH.URL_PICTURE_TYPE, params, context, new OnLoadPictureListener() {
            @Override
            public void onSuccess(List<PictureListBean> list) {
                view.onLoadStarPictureSuccess(list);
            }

            @Override
            public void onFailure(Exception e) {

            }
        });
    }
}
